home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QuickTime - The Beta Release
/
QuickTime - The Beta Release.iso
/
Programming Stuff
/
Interfaces
/
Oldstyle C Interfaces
/
MovieController.h
< prev
next >
Wrap
Text File
|
1991-09-06
|
8KB
|
214 lines
/*
File: MovieController.h
Copyright: © 1991 by Apple Computer, Inc., all rights reserved.
*/
#ifndef _MovieController_
#define _MovieController_
#include <QuickDraw.h>
#include <Windows.h>
#include <QDOffscreen.h>
#include "Components.h"
#include "Movies.h"
typedef ComponentInstance MovieController;
typedef enum { /* !!! should remove obsolete things !!! */
mcIdle = 1,
mcDraw,
mcActivate,
mcDeactivate,
mcMouseDown,
mcKey,
mcReserved6,
mcPlay, /* param is fixed-rate */
mcReserved7,
mcGotoStart,
mcGotoEnd,
mcGotoTime,
mcMuteToggle,
mcSetVolume,
mcGetVolume,
mcReserved2,
mcReserved3,
mcStep, /* param is number of steps */
mcReserved8,
mcReserved9,
mcSetLooping,
mcGetLooping,
mcSetLoopIsPalindrome,
mcGetLoopIsPalindrome,
mcSetGrowBoxBounds,
mcControllerSizeChanged,
mcReserved4,
mcReserved5,
mcSetSelectionBegin,
mcSetSelectionDuration, /* action only taken on set-duration */
mcSetPosterTime,
mcSetKeysEnabled,
mcGetKeysEnabled,
mcSetPlaySelection,
mcGetPlaySelection,
mcSetUseBadge, /* param is boolean */
mcGetUseBadge, /* param is ptr to boolean */
mcSetFlags, /* param = long of bits */
mcGetFlags, /* param = ptr to long of bits */
mcSetPlayEveryFrame,
mcGetPlayEveryFrame
} mcAction;
typedef enum
{
mcFlagSuppressMovieFrame = 1<<0,
mcFlagSuppressStepButtons = 1<<1,
mcFlagSuppressSpeakerButton = 1<<2
} mcFlags;
#if THINK_C==1
typedef Boolean (*MCActionFilter)(MovieController mc, short *action, void *params);
#else
typedef pascal Boolean (*MCActionFilter)(MovieController mc, short *action, void *params);
#endif
/* target management */
pascal ComponentResult MCSetMovie(MovieController mc, Movie m, WindowPtr movieWindow,
Point where) = {0x2f3c,12,2,0x7000,0xa82a};
/*
if movieWindow is 0, the current port is used
where is the topLeft point of the movie rectangle -- to have a default size
other than the movie rectangle, use SetMovieBounds before calling MCSetMovie
do we need to also pass a GDevice??
*/
pascal ComponentResult MCRemoveMovie(MovieController mc, Movie m) = {0x2f3c,4,3,0x7000,0xa82a};
pascal long MCCountMovies(MovieController mc) = {0x2f3c,0,4,0x7000,0xa82a};
pascal Movie MCGetIndMovie(MovieController mc, short index) = {0x2f3c,2,5,0x7000,0xa82a};
pascal ComponentResult MCRemoveAllMovies(MovieController mc) = {0x2f3c,0,6,0x7000,0xa82a};
/* event handling etc. */
pascal ComponentResult MCIsPlayerEvent(MovieController mc, const EventRecord *e) = {0x2f3c,4,7,0x7000,0xa82a};
pascal void MCSetActionFilter(MovieController mc, MCActionFilter blob) = {0x2f3c,4,8,0x7000,0xa82a};
/*
proc is of the form:
Boolean userPlayerFilter(MovieController mc, short *action, void *params) =
proc returns TRUE if it handles the action, FALSE if not
action is passed as a VAR so that it could be changed by filter (ick)
this is consistent with the current dialog manager stuff
params is any potential parameters that go with the action <triple ick>
such as set playback rate to xxx.
*/
pascal ComponentResult MCDoAction(MovieController mc, short action, void *params) = {0x2f3c,6,9,0x7000,0xa82a};
/* state type things */
pascal ComponentResult MCSetControllerAttached(MovieController mc, Boolean attach) = {0x2f3c,2,10,0x7000,0xa82a};
pascal ComponentResult MCIsControllerAttached(MovieController mc) = {0x2f3c,0,11,0x7000,0xa82a};
pascal ComponentResult MCSetControllerPort(MovieController mc, CGrafPtr gp) = {0x2f3c,4,12,0x7000,0xa82a};
pascal CGrafPtr MCGetControllerPort(MovieController mc) = {0x2f3c,0,13,0x7000,0xa82a};
pascal ComponentResult MCGetVisible(MovieController mc) = {0x2f3c,0,15,0x7000,0xa82a};
pascal ComponentResult MCSetVisible(MovieController mc, Boolean visible) = {0x2f3c,2,14,0x7000,0xa82a};
pascal ComponentResult MCGetControllerBoundsRect(MovieController mc, Rect *bounds) = {0x2f3c,4,16,0x7000,0xa82a};
pascal ComponentResult MCSetControllerBoundsRect(MovieController mc, const Rect *bounds) = {0x2f3c,4,17,0x7000,0xa82a};
pascal RgnHandle MCGetControllerBoundsRgn(MovieController mc) = {0x2f3c,0,18,0x7000,0xa82a};
pascal RgnHandle MCGetWindowRgn(MovieController mc, WindowPtr w) = {0x2f3c,4,19,0x7000,0xa82a};
/* other stuff */
pascal ComponentResult MCMovieChanged(MovieController mc, Movie m) = {0x2f3c,4,20,0x7000,0xa82a};
/*
called when the app has changed thing about the movie (like bounding rect) or rate. So that we
can update our graphical (and internal) state accordingly.
*/
pascal ComponentResult MCSetDuration(MovieController mc, TimeValue duration) = {0x2f3c,4,21,0x7000,0xa82a};
/*
duration to use for time slider -- will be reset next time MCMovieChanged is called
or MCSetMovie is called
*/
pascal TimeValue MCGetCurrentTime(MovieController mc, TimeScale *scale) = {0x2f3c,4,22,0x7000,0xa82a};
/*
returns the time value and the time scale it is on. if there are no movies, the
time scale is passed back as 0. scale is an optional parameter
*/
pascal ComponentResult MCNewAttachedController(MovieController mc, Movie m,
WindowPtr w, Point where) = {0x2f3c,12,23,0x7000,0xa82a};
/*
makes m the only movie attached to the controller. makes the controller visible.
the window and where parameters are passed a long to MCSetMovie and behave as
described there
*/
pascal ComponentResult MCDraw(MovieController mc, WindowPtr w) = {0x2f3c,4,24,0x7000,0xa82a};
pascal ComponentResult MCActivate(MovieController mc, WindowPtr w, Boolean activate) = {0x2f3c,6,25,0x7000,0xa82a};
pascal ComponentResult MCIdle(MovieController mc) = {0x2f3c,0,26,0x7000,0xa82a};
pascal ComponentResult MCKey(MovieController mc, char key, long modifiers) = {0x2f3c,6,27,0x7000,0xa82a};
pascal ComponentResult MCClick(MovieController mc, WindowPtr w, Point where, long when, long modifiers) = {0x2f3c,16,28,0x7000,0xa82a};
/*
calls for editing
*/
pascal ComponentResult MCEnableEditing(MovieController mc, Boolean enabled) = {0x2f3c,2,29,0x7000,0xa82a};
pascal long MCIsEditingEnabled(MovieController mc) = {0x2f3c,0,30,0x7000,0xa82a};
pascal Movie MCCopy(MovieController mc) = {0x2f3c,0,31,0x7000,0xa82a};
pascal Movie MCCut(MovieController mc) = {0x2f3c,0,32,0x7000,0xa82a};
pascal ComponentResult MCPaste(MovieController mc, Movie srcMovie) = {0x2f3c,4,33,0x7000,0xa82a};
pascal ComponentResult MCClear(MovieController mc) = {0x2f3c,0,34,0x7000,0xa82a};
pascal ComponentResult MCUndo(MovieController mc) = {0x2f3c,0,35,0x7000,0xa82a};
/*
* somewhat special stuff
*/
pascal ComponentResult MCPositionController(MovieController mc, Rect *movieRect,
Rect *controllerRect, long someFlags) = {0x2f3c,12,36,0x7000,0xa82a};
/*
menu related stuff
*/
enum {
mcInfoUndoAvailable = 1<<0,
mcInfoCutAvailable = 1<<1,
mcInfoCopyAvailable = 1<<2,
mcInfoPasteAvailable = 1<<3,
mcInfoClearAvailable = 1<<4,
mcInfoHasSound = 1<<5,
mcInfoIsPlaying = 1<<6,
mcInfoIsLooping = 1<<7,
mcInfoIsInPalindrome = 1<<8,
mcInfoEditingEnabled = 1<<9
};
pascal ComponentResult MCGetControllerInfo(MovieController mc, long *someFlags) = {0x2f3c,4,37,0x7000,0xa82a};
pascal ComponentResult MCNewControllerFromFile(MovieController mc, short resRefNum, short resId,
WindowPtr movieWindow,Point where) = {0x2f3c,12,38,0x7000,0xa82a};
pascal ComponentResult MCSetBadgePict(MovieController mc,PicHandle badgePict) = {0x2f3c,4,39,0x7000,0xa82a};
pascal ComponentResult MCSetClip(MovieController mc, RgnHandle theClip, RgnHandle movieClip) = {0x2f3c,8,40,0x7000,0xa82a};
pascal ComponentResult MCGetClip(MovieController mc, RgnHandle *theClip, RgnHandle *movieClip) = {0x2f3c,8,41,0x7000,0xa82a};
pascal ComponentResult MCDrawBadge(MovieController mc, RgnHandle movieRgn, RgnHandle *badgeRgn) = {0x2f3c,8,42,0x7000,0xa82a};
/**** error codes ******/
enum {
cannotMoveAttachedController = -9999,
controllerHasFixedHeight = -9998,
cannotSetWidthOfAttachedController = -9997,
controllerBoundsNotExact = -9996,
editingNotAllowed = -9995,
badControllerHeight = -9994
};
#endif _MovieController_